
<%@ include file="/html/edutopia/init.jsp" %>

<c:choose>
	<c:when test="<%= Validator.isNotNull(url) %>">

		<%
		StringBundler sb = new StringBundler();

		if (autoplay) {
			sb.append("autoplay=1&amp;");
		}

		sb.append("&amp;color=" + playerColorHex);
		sb.append("&amp;fullscreen=" + enableFullscreenBinary);
		sb.append("&amp;server=edutopia.org");
		sb.append("&amp;show_byline=" + showBylineBinary);
		sb.append("&amp;show_portrait=" + showPortraitBinary);
		sb.append("&amp;show_title=" + showTitleBinary);
		
		StringBundler flashVars = new StringBundler();
		flashVars.append("videoId=" + id);
		flashVars.append("&amp;&linkBaseURL=http://edutopia.org/" + "john-stanford-international-school-language-immersion-video");
		flashVars.append("&amp;playerID=85476225001");
		flashVars.append("&amp;playerKey=AQ~~,AAAAEB37iok~,WCM8Fxf9urWXvPHVqwbTgBZpf-N7C4SW&domain=embed&amp;dynamicStreaming=true");
		%>

		<liferay-ui:flash
			allowFullScreen="true"
			allowScriptAccess="true"
			base="http://admin.brightcove.com"
			height="<%= height %>"
			flashvars="videoId=650988387001&linkBaseURL=http%3A%2F%2Fwww.edutopia.org%2Fstw-social-emotional-learning-after-school-video"
			movie='http://c.brightcove.com/services/viewer/federated_f9?isVid=1&isUI=1'
			swliveconnect="true"
			width="<%= width %>"
			wmode="opaque"
		/>
	</c:when>
	<c:otherwise>
		<liferay-util:include page="/html/portal/portlet_not_setup.jsp" />
	</c:otherwise>
</c:choose>